﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master_Page/Master_Popup.Master" CodeBehind="UploadFile.aspx.vb" Inherits="I_PORT.UploadFile" 
    title="IRPC INTELLIGENT PORT SERVICE" %>
    
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/Control/Confirm.ascx" TagName="Confirm1" TagPrefix="Confirm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script type="text/javascript" language="javascript">
                    var _source;
    // keep track of the popup div
    var _popup;

    function showConfirm(customerid) {
        this._source = customerid;
        this._popup = $find('ModalPopupExtender3'); 
        this._popup.show();  
    }
       function okClick(){
        //  find the confirm ModalPopup and hide it
       this._popup.hide();

        __doPostBack(this._source.name,'');
        
    }
    
    function cancelClick(){
        //  find the confirm ModalPopup and hide it
        this._popup.hide();
    }
    </script>
  <asp:UpdatePanel ID="updatepanelUpload" runat="server" UpdateMode="Conditional">
     <ContentTemplate>
     <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td colspan="2" style="height: 5px;">
                                <img src="../Image/space.gif" />
                            </td>
                        </tr>
                        <tr>
                           <td style="width:20%;" align="right"><asp:Label ID="LabelQ88" runat="server" SkinID="lbtxt" Text="ไฟล์ Q88 :"></asp:Label>&nbsp;</td>
                           <td align="left">
                               <asp:FileUpload ID="FileUpload1" runat="server" />
                          </td>
                        </tr>
                        <tr>
                           <td style="width:20%;" valign="top" align="right"><asp:Label ID="Label2" runat="server" SkinID="lbtxt" Text="รายะเอียดไฟล์ Q88 :"></asp:Label>&nbsp;</td>
                           <td align="left" valign="bottom">
                               <asp:TextBox ID="txtRemarkQ88" runat="server" TextMode="MultiLine" Width="350px" Height="40px" ></asp:TextBox>&nbsp;<asp:Button ID="btnQ88" runat="server" Text="Upload Q88" CssClass="ButtonStyle" />
                          </td>
                        </tr>
                        <tr>
                           <td style="width:20%;" align="right"><asp:Label ID="Label1" runat="server" SkinID="lbtxt" Text="ไฟล์อื่นๆ :"></asp:Label>&nbsp;</td>
                           <td align="left">
                               <asp:FileUpload ID="FileUpload2" runat="server" />
                          </td>
                        </tr>
                        <tr>
                           <td style="width:20%;" valign="top" align="right"><asp:Label ID="Label3" runat="server" SkinID="lbtxt" Text="รายะเอียดไฟล์อื่นๆ  :"></asp:Label>&nbsp;</td>
                           <td align="left" valign="bottom">
                               <asp:TextBox ID="txtRemarkOther" runat="server" TextMode="MultiLine" Width="350px" Height="40px" ></asp:TextBox>&nbsp;<asp:Button ID="btnOther" runat="server" Text="Upload Other" CssClass="ButtonStyle" />
                          </td>
                        </tr>
                        <tr>
                               <td align="right">&nbsp;</td>
                               <td align="left">
                                   <asp:GridView ID="gridfile" runat="server" SkinID="gridblueNoPage" DataKeyNames="File_nameGuid,File_ContentType"
                                   AutoGenerateColumns="False">
                                    <Columns>
                                        <asp:BoundField HeaderText="ชื่อไฟล์" DataField="File_name" />
                                        <asp:BoundField HeaderText="นามสกุล" DataField="File_type" />
                                        <asp:BoundField HeaderText="Type" DataField="Upload_Type" />
                                        <asp:BoundField HeaderText="รายละเอียด" ItemStyle-Wrap="true" DataField="Description" />
                                        <asp:TemplateField HeaderText="ลบ" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                          <asp:ImageButton ID="imgdelete" CommandName="cmddelete" CommandArgument="<%# Container.DataItemIndex %>" OnClientClick="showConfirm(this); return false;"  runat="server" ImageUrl="~/Image/cancel-24.gif" />
                                        </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                  </asp:GridView>
                               </td>
                            </tr>
                          <tr>
                            <td style="height:5px;"><img src="../Image/space.gif" /></td>
                          </tr>
                        <tr>
                           <td style="width:20%;" align="right">&nbsp;</td>
                           <td align="left" >
                               <asp:Button ID="btnSave" runat="server" Text="บันทึก" CssClass="ButtonStyle" />
                              <asp:Button ID="btnClose" runat="server" Text="ปิด" CssClass="ButtonStyle" />
                          </td>
                        </tr>
                        <tr>
                          <td colspan="2" align="center">
                            <table width="70%" border="0" cellpadding="2" cellspacing="0">
                              <tr>
                                <td align="left">&nbsp;<asp:Label ID="Labelseresxsa" runat="server" Text="ข้อควรพึงระวัง   ไม่ควรมีอักขระ  ' ในชื่อของเอกสาร" Font-Bold="true" SkinID="lbtxtNoColor" ForeColor="Red" ></asp:Label></td>
                              </tr>
                              <tr>
                                 <td>&nbsp;</td>
                              </tr>
                              <tr>
                                <td align="left">&nbsp;<asp:Label ID="lbHeadCOmment" runat="server" Text="*** เอกสารที่ควรทำการแนบเพื่อความสะดวกในการดำเนินงานของเจ้าหน้าที่" SkinID="lbtxtNoColor" ForeColor="Red" ></asp:Label></td>
                              </tr>
                               <tr>
                                <td align="left">&nbsp;<asp:Label ID="Label4" runat="server" Text="1). ใบอนุญาติผ่านเข้าท่าเรือ" SkinID="lbtxtNoColor" ForeColor="Red" ></asp:Label></td>
                              </tr>
                               <tr>
                                <td align="left">&nbsp;<asp:Label ID="Label5" runat="server" Text="2). ใบขอรับน้ำ" SkinID="lbtxtNoColor" ForeColor="Red" ></asp:Label></td>
                              </tr>
                               <tr>
                                <td align="left">&nbsp;<asp:Label ID="Label6" runat="server" Text="3). ใบ Security Level" SkinID="lbtxtNoColor" ForeColor="Red" ></asp:Label></td>
                              </tr>
                               <tr>
                                <td align="left">&nbsp;<asp:Label ID="Label7" runat="server" Text="4). ใบ ตม.1,ตม.2" SkinID="lbtxtNoColor" ForeColor="Red" ></asp:Label></td>
                              </tr>
                               <tr>
                                <td align="left">&nbsp;<asp:Label ID="Label8" runat="server" Text="5). Arrival Draft" SkinID="lbtxtNoColor" ForeColor="Red" ></asp:Label></td>
                              </tr>
                            </table>
                          </td>
                        </tr>
                        <tr>
                           
                        </tr>
                        <tr>
                            <td colspan="2" style="height: 5px;">
                                <img src="../Image/space.gif" />
                            </td>
                        </tr>
                     </table>
                </td>
            </tr>
        </table>
        <asp:Button ID="BtnTrigger" runat="server" Text="Button" style="display:none" />
            <asp:ModalPopupExtender ID="ModalPopupExtender3" BehaviorID="ModalPopupExtender3" runat="server" 
                                    OkControlID="ctl00_contentplaceholder1_ConfirmDelete_btnOk" 
                                    OnOkScript="okClick();" 
                                    CancelControlID="ctl00_contentplaceholder1_ConfirmDelete_btnNo"     
                                    OnCancelScript="cancelClick();" 
                                     BackgroundCssClass="Background" DropShadow="false" 
                                      PopupControlID="PanelConfirm" TargetControlID="BtnTrigger" >
        </asp:ModalPopupExtender>
      <asp:Panel ID="PanelConfirm" runat="server" style="display:none;">
       <Confirm:Confirm1 ID="ConfirmDelete" runat="server" ></Confirm:Confirm1>
    </asp:Panel>
     </ContentTemplate>
     <Triggers>
        <asp:PostBackTrigger ControlID="btnQ88" />
        <asp:PostBackTrigger ControlID="btnOther" />
     </Triggers>
  </asp:UpdatePanel>
        
</asp:Content>
